home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CBASE102.ARJ / LSGETR.C < prev    next >
Text File  |  1991-09-23  |  1KB  |  58 lines

  1. /*    Copyright (c) 1989 Citadel    */
  2. /*       All Rights Reserved        */
  3.  
  4. /* #ident    "@(#)lsgetr.c    1.5 - 91/09/23" */
  5.  
  6. #include <ansi.h>
  7.  
  8. /* ansi headers */
  9. #ifdef AC_STDDEF
  10. #include <stddef.h>
  11. #endif
  12.  
  13. /* local headers */
  14. #include "lseq_.h"
  15.  
  16. /*man---------------------------------------------------------------------------
  17. NAME
  18.      lsgetr - get current lseq record
  19.  
  20. SYNOPSIS
  21.      #include <lseq.h>
  22.  
  23.      int lsgetr(lsp, buf)
  24.      lseq_t *lsp;
  25.      void *buf;
  26.  
  27. DESCRIPTION
  28.      The lsgetr function reads the record from the current cursor
  29.      position in lseq lsp into buf.  buf must point to a storage area
  30.      as large as the record size for lsp.
  31.  
  32.      lsgetr will fail if one or more of the following is true:
  33.  
  34.      [EINVAL]       lsp is not a valid lseq pointer.
  35.      [EINVAL]       buf is the NULL pointer.
  36.      [LSELOCK]      lsp is not read locked.
  37.      [LSENOPEN]     lsp is not open.
  38.      [LSENREC]      The cursor is null.
  39.  
  40. SEE ALSO
  41.      lscursor, lsgetrf, lsputr.
  42.  
  43. DIAGNOSTICS
  44.      Upon successful completion, a value of 0 is returned.  Otherwise,
  45.      a value of -1 is returned, and errno set to indicate the error.
  46.  
  47. ------------------------------------------------------------------------------*/
  48. #ifdef AC_PROTO
  49. int lsgetr(lseq_t *lsp, void *buf)
  50. #else
  51. int lsgetr(lsp, buf)
  52. lseq_t *lsp;
  53. void *buf;
  54. #endif
  55. {
  56.     return lsgetrf(lsp, (size_t)0, buf, lsp->lshdr.recsize);
  57. }
  58.